from PyInstaller.utils.hooks import collect_all, collect_data_files

# 收集 NeMo 的所有依赖
datas, binaries, hiddenimports = collect_all('nemo')

# 额外添加可能缺失的依赖
hiddenimports += [
    'nemo.collections.asr',
    'nemo.collections.common', 
    'nemo.collections.common.parts',
    'nemo.collections.asr.models',
    'nemo.collections.asr.data',
    'nemo.core',
    'nemo.utils',
    'lhotse',
    'webdataset',
]

# 包含所有 Python 源代码文件
datas += collect_data_files('nemo', include_py_files=True)